<script type="text/javascript">
$(document).ready(function(){

	$("#menuPub a").click(function(){
	
	  var largePath = $(this).attr("rel");
	  var num = $(this).attr("class");
		
	  $("#pub img").attr({ src: largePath });
	  $("#pub img").attr({ class: num });
	  
		return false;
	});

	function(){
		var num = $("#pub img").attr("class");
		
	}
	
});
</script>

<!-- ACCUEIL -->
	
<div id="accueil">

	<!-- PUB -->
	
	<div id="pubAccueil" align="center">
	
		<!-- MENU PUB -->

		<div id="menuPub">
			<a class="1" href="#" rel="/images/pubs/pubOrdi.jpg" >Promo ordinateur</a>
			<a class="2" href="#" rel="/images/header.png" >Promo ordinateur</a>
			<a class="3" href="#" rel="/images/pubs/pubOrdi.jpg" >Promo ordinateur</a>
			<a class="4" href="#" rel="/images/header.png" >Promo ordinateur</a>
			<a class="5" href="#" rel="/images/pubs/pubOrdi.jpg" >Promo ordinateur</a>
			<a class="6" href="#" rel="/images/header.png" >Promo ordinateur</a>
			<a class="7" href="#" rel="/images/pubs/pubOrdi.jpg" >Promo ordinateur</a>
		</div>
		
		<!-- PUB -->
		
		<div id="pub" >
			<img class="1" src="/images/pubs/pubOrdi.jpg">
			<a href="#" >Ajouter au panier</a>
			<a href="#" >Autre articles</a>
		</div>

	</div>
</div>

<br><br>
      <div id="content">
        <div class="content">
          <?php echo $sf_content ?>
        </div>
      </div>
<br><br>


<?php use_stylesheet('jobs.css') ?>
<div id="jobs">
  <?php foreach ($categories as $category): ?>
    <div class="category_<?php echo fkshop::slugify($category->getLibelle()) ?>">
      <div class="category">
        <div class="feed">
          <a href="">Feed</a>
        </div>
       <!-- <h1><?php echo $category->getLibelle() ?></h1> --> 
        <h1>
          <?php echo link_to($category->getLibelle(), 'category', $category) ?>
        </h1>
      </div>
      
		<?php include_partial('product/list', array('products' => $category->getProduct(sfConfig::get('max_products_on_homepage')))) ?>
  
  		<?php if (($count = $category->countProducts() - sfConfig::get('app_max_jobs_on_homepage')) > 0): ?>
        <div class="more_jobs">
          and <?php echo link_to($count, 'category', $category) ?>
          more...
        </div>
      <?php endif; ?>
      
      
  </div>
  <?php endforeach; ?>
</div>

<?php //echo count($randomProducts) ?>